<!DOCTYPE html> 
<html lang="en"> 
<head> 
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
	<meta name="viewport" content="width=device-width, initial-scale=1">
	<title>jQueryMobile - DateBox Demos</title>
	<link rel="stylesheet" href="http://code.jquery.com/mobile/latest/jquery.mobile.css" />
	<link type="text/css" href="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.min.css" rel="stylesheet" /> 
	<link type="text/css" href="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.css" rel="stylesheet" /> 
	<link type="text/css" href="http://dev.jtsage.com/jQM-DateBox/css/demos.css" rel="stylesheet" /> 
	
	<!-- NOTE: Script load order is significant! -->
	
	<script type="text/javascript" src="http://code.jquery.com/jquery-1.7.1.js"></script> 
	<script type="text/javascript" src="http://code.jquery.com/mobile/latest/jquery.mobile.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/jquery.mousewheel.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/jQM-DateBox2/js/jqm-datebox.core.js"></script><!--cdn/datebox/latest-->
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.calbox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.datebox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.flipbox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.durationbox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/latest/jqm-datebox.mode.slidebox.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/datebox/i18n/jquery.mobile.datebox.i18n.en_US.utf8.js"></script>
	
	<script type="text/javascript" src="http://dev.jtsage.com/cdn/simpledialog/latest/jquery.mobile.simpledialog.min.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/jQM-DateBox/demos/extras.js"></script>
	<script type="text/javascript" src="http://dev.jtsage.com/gpretty/prettify.js"></script>
	<link type="text/css" href="http://dev.jtsage.com/gpretty/prettify.css" rel="stylesheet" />
	<script type="text/javascript">
		$('div').live('pagecreate', function() {
			prettyPrint()
		});
	</script>
	
</head>
<body>
<div data-role="page" id="timeIndex"> 
	<div data-role="header" data-position="fixed"> 
		<h1>jQueryMobile - DateBox</h1>
		<a href="../../" data-icon="home" data-iconpos="notext">Home</a>
	</div>
	<div data-role="content">
		<div class="content-secondary"> 
			<div id="jqm-homeheader"> 
				<h1 id="jqm-logo"><img src="../jquery-logo-db.png" alt="jQuery Mobile Framework :: DateBox" /></h1> 
				<p>A Date and Time Picker plugin for jQueryMobile</p> 
			</div> 
			
			<div class="scriptdemos sidebar"></div>
		</div>
		
		<div class="content-primary"> 
			<div data-role="collapsible-set" data-mini="true">
			
				<div data-role="collapsible" data-collapsed="false"> 
					<h2>Conversion of Dates</h2>
				
					<div style="display: none">
						<input name="dbox" type="date" data-role="datebox" id="dbox" />
					</div>
					<p>Given the date 2001-03-04, lets convert it to Day, Month Date w/ Ordinal Suffix Year</p>
					<p>Note that using this library *just* for this is a bit of a waste - maybe you want to look at <a rel="external" href="http://dev.jtsage.com/DateBox-Unbound/">DateBox-Unbound</a> instead?</p>
					<a href="#" data-role="button" id="dodate">Convert</a>
					<p>Converted date: <span id="outdate"></span></p>
					<script type="text/javascript">
					$('#dodate').live('vclick', function() {
						$('#dbox').datebox({'overrideDateFormat': '%Y-%m-%d'});
						$('#dbox').val('2001-03-04').trigger('change');
						$('#outdate').text($('#dbox').datebox('callFormat', '%A, %B %-d%o, %Y', $('#dbox').datebox('getTheDate')));
					});
					</script>
					<pre class="prettyprint">&lt;div style="display: none"&gt;
    &lt;input name="dbox" type="date" data-role="datebox" id="dbox" /&gt;
&lt;/div&gt;
&lt;p&gt;Given the date 2001-03-04, lets convert it to Day, Month Date w/ Ordinal Suffix Year&lt;/p&gt;
&lt;a href="#" data-role="button" id="dodate"&gt;Convert&lt;/a&gt;
&lt;p&gt;Converted date: &lt;span id="outdate"&gt;&lt;/span&gt;&lt;/p&gt;
</pre>
					<pre class="prettyprint">$('#dodate').live('vclick', function() {
  // Set the input format
  $('#dbox').datebox({'overrideDateFormat': '%Y-%m-%d'});
  // Set the input date
  $('#dbox').val('2001-03-04').trigger('change');
  
  // callFormat with the output format and date
  $('#outdate').text($('#dbox').datebox('callFormat', '%A, %B %-d%o, %Y', $('#dbox').datebox('getTheDate')));
});
		</pre>
				</div>
			</div>
		</div> 
	</div>
	<div data-role="footer" data-position="fixed">
	</div>
</div>
</html>
